<script type="text/javascript">
  $(document).ready(function() {
    $("#formcontact").validate();
  })
</script>
<style type="text/css">
  .error{
    color: red;
    font-weight: normal;
    padding-top: 3px;
  }
  .label-form{
    font-size: 12px;
    font-weight: normal;
  }
</style>
 
</script>
    <div class="container margin-top-content">
      <div class="row">
        <div class="col-md-10 col-md-offset-1">
          <div class="col-md-12">
            <div class="row outer-border shadow singlepage">
              
              <div class="col-md-9 padding15">
                <h4 class="font-biru judul-singlepage"><?php echo $hasil['judul']?></h4>
                <?php
        				echo $hasil['konten'];
                if($hasil['slug'] == 'contact-us'){
                ?>
                  <br>
                    <h4 class="font-biru judul-singlepage judul-pesan">Contact Form</h4>
                    <form class="form-horizontal" id="formcontact" role="form" method="post" action="<?php echo site_url('sendemail')?>" enctype="multipart/form-data">
                      <?php
                        $sukses = $this->session->flashdata('pesan_sukses');
                        $gagal = $this->session->flashdata('pesan_gagal');
                        if(!empty($sukses)){
                          echo "<div class='alert alert-success'>Send Message Success</div>";
                        }
                        if(!empty($gagal)){
                          echo "<div class='alert alert-danger'>Invalid Captcha Code</div>";
                        }
                      ?>
                      <div class="form-group">
                        <label class="col-lg-2 label-form">Name</label>
                        <div class="col-lg-5">
                          <input type="text" name="nama" id="nama" class="form-control input-sm required" placeholder="Your Name" title="Name is required.">
                        </div>
                      </div>
                      <div class="form-group">
                        <label class="col-lg-2 label-form">Email</label>
                        <div class="col-lg-5">
                          <input type="text" name="email" id="email" class="form-control input-sm required email" placeholder="Your Email" title="Please enter an email address.">
                        </div>
                      </div>
                      <div class="form-group">
                        <label class="col-lg-2 label-form">Subject</label>
                        <div class="col-lg-5">
                          <input type="text" name="subject" id="subject" class="form-control input-sm required" placeholder="Subjek Email" title="Subject is required.">
                        </div>
                      </div>
                      <div class="form-group">
                        <label class="col-lg-2 label-form">Message</label>
                        <div class="col-lg-7">
                          <textarea type="text" name="pesan" id="pesan" class="form-control input-sm required" placeholder="Your message" title="Message is required."></textarea>
                        </div>
                      </div>
                      <div class="form-group">
                        <label class="col-lg-2 label-form"></label>
                        <div class="col-lg-7">
                          <?=$image;?>
                        </div>
                      </div>
                      <div class="form-group">
                        <label class="col-lg-2 label-form">Captcha</label>
                        <div class="col-lg-5">
                          <input type="text" name="security_code" id="security_code" class="form-control input-sm required" placeholder="Captcha" title="Captcha is required.">
                          <input type="hidden" name="captcha2" id="captcha2" value="<?php echo $ses; ?>">
                        </div>
                      </div>
                      <div class="form-group">
                        <div class="col-lg-offset-2 col-lg-4">
                          <button type="submit" class="btn btn-primary btn-sm" name="simpan">Send</button>
                          <button type="reset" class="btn btn-warning btn-sm" name="reset">Reset</button>
                        </div>
                      </div>
                    </form>
                <?php
                }
        				?>
              </div>
              <div class="col-md-3 padding15">
                <?php
                  $this->load->view('sidebar_page');
                ?>
              </div>
            <div class="clearfix"></div>
            </div>
          </div>
        <div class="clearfix"></div>
        </div>
      </div>
    </div><!-- /.container -->